﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpObjects.RuleEngine
{
    public class RuleEngine : IRuleEngine
    {
        #region IRuleEngine Members

        public void Execute(ref IRuleEngineContext ruleEngineContext, IDataProvider dataProvider, IRule[] rules)
        {
            foreach (IRule rule in rules)
            {
                Execute(ref ruleEngineContext, dataProvider, rule);
            }
        }

        public void Execute(ref IRuleEngineContext ruleEngineContext, IDataProvider dataProvider, IRule rule)
        {
            rule.Execute(ref ruleEngineContext, dataProvider);
        }

        #endregion
    }
}
